<script type="text/x-jquery-tmpl" id='resultTmpl'>
<table>
  <thead>
    <tr>
      <th><a href="">Name</a></th>
      <th><a href="">Owner</a></th>
      <th><a href="">Stars</a></th>
      <th><a href="">Updated</a></th>
    </tr>
    <tbody>
      <%for(var i = 0; i < packages.length; i++) { 
        var pack = packages[i].toJSON();
      %>
        <tr id="<%=pack._id%>">
          <td>
            <h4><a id='detail' data-id='<%=pack._id%>' ref='<%=pack.home_url%>'><%=pack.name%></a></h4>
            <p><%=pack.description%></p>
          </td>
          <td><%=pack.author%></td>
          <td><%=pack.rating.toString().substring(0,3)%></td>
          <td><%=new Date(pack.revice_date).format('yyyy-MM-dd')%></td>
        </tr>
      <%}%>
    </tbody>
  </thead>
</table>
<ul class='page'>
  <li id='previous'>Previous</li>
  <li id='next'>Next</li>
</ul>
<div id='pageDesc' class='page-desc'><%=packages.length%> matched results. Showing page 1 of 1.</div>
  
</script>

<header>
  <div class="container">
    <div class="logo">
      <img src="./imgs/logo.png">
    </div>
    <h1>Chameleon Package Store</h1>
    <input id='searchInput' class='search' placeholder="e.g. 'package-name', OR 'keyword', OR 'keyword owner:jquery'">
    <button id='createPackage' class='search-button' >Create</button>
  </div>
</header>
<section>
  <div id='results' class="container">
    
  </div>
</section>